<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>练习4</title>
</head>
<body>
<div id="app">
    <h1>学生成绩列表-及格学生</h1>
    <table width="300px" border="1px">
        <tr>
            <th>id</th>
            <th>name</th>
            <th>age</th>
            <th>score</th>
        </tr>
        <tr v-for="stu in students" v-if="stu.score>=60">
            <td>{{stu.id}}</td>
            <td>{{stu.name}}</td>
            <td>{{stu.age}}</td>
            <td>{{stu.score}}</td>
        </tr>
    </table>
</div>
<script src="vue.js"></script>
<script>
    new Vue({
        el: "#app",
        data: {
            students: [
                {id: 1, name: "jack", age: 15, score: 90},
                {id: 2, name: "tom", age: 16, score: 30},
                {id: 3, name: "bob", age: 15, score: 60},
                {id: 4, name: "mary", age: 16, score: 70}
            ]
        }
    })
</script>
</body>
</html>